package com.yhl.springtest.proxy_static;

/**
 * @author: yanghl
 * @description: 静态代理：学生代理类
 * @date: 2023/8/15 16:50
 */
public class StudentProxy implements Person{
    Student student;
    public StudentProxy(Person person){
        // 代理学生对象
        if (person.getClass() == Student.class){
            this.student = (Student) person;
        }
    }

    @Override
    public void giveTask() {
        System.out.println("代理: ");
        student.giveTask();
    }
}

